<template>
    <div id="dplayer_mp4"></div>
</template>

<script>
    import DPlayer from 'dplayer';
    export default {
        name: "Mp4Player",
        data(){
          return{
              playUrl:'https://1251316161.vod2.myqcloud.com/007a649dvodcq1251316161/111001295285890810113178197/bO7IHb9eGRoA.mp4'
          }
        },
        methods: {
            play() {
                console.log('play callback')
            }
        },
        mounted() {
            const dp = new DPlayer({
                container: document.getElementById('dplayer_mp4'),
                video: {
                    url: this.playUrl,
                    type: 'auto'
                },
                autoplay: false,
                theme: '#FADFA3',
                loop: false,
                lang: 'zh-cn',
                screenshot: true,
                hotkey: true,
                preload: 'auto',
                volume: 0.7,
                mutex: true,
            });
        }
    }
</script>

<style scoped>

</style>